package com.macro.mall.dto.admin;

import cn.hutool.core.date.DatePattern;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * Created by @author dabaoqiang on 2024/6/22.
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class AdminClockUpdateDTO implements Serializable {

    private static final long serialVersionUID = -709451486642692594L;

    @ApiModelProperty(value = "主键")
    @NotNull(message = "主键不能为空")
    private Long id;

    @ApiModelProperty(value = "打卡类型1-> 打卡 2-> 请假 3-> 旷卡")
    @NotNull(message = "打卡类型不能为空")
    private Integer type;

    @ApiModelProperty(value = "时间间隔")
    @NotNull(message = "时间间隔不能为空")
    private Integer timeInterval;

    @ApiModelProperty(value = "签到日期")
    @NotNull(message = "签到日期不能为空")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DatePattern.NORM_DATETIME_PATTERN)
    private Date signDate;

}
